package com.tan.common.mapstruct.user;

import com.tan.common.domain.user.SysRole;
import com.tan.common.dto.user.RoleCreateDto;
import com.tan.common.dto.user.RoleUpdateDto;
import com.tan.common.mapstruct.BaseConvert;
import com.tan.common.vo.user.RoleVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author Tan-Bowen
 * @description
 * @date 2025/2/17 11:22
 */
@Mapper
public interface RoleConvert extends BaseConvert<RoleVO, SysRole> {

    RoleConvert INSTANCE = Mappers.getMapper(RoleConvert.class);

    @Override
    RoleVO toTarget(SysRole source);


    @Override
    List<RoleVO> toTargets(List<SysRole> source);


    SysRole dtoDomain(RoleCreateDto dto);

    SysRole dtoDomain(RoleUpdateDto dto);

}
